package com.pro.api;

import com.pro.bean.Sign;
import com.pro.service.SignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 签到后台
 *
 * 刘永康
 */
@RestController
@RequestMapping("sign")
public class SignController {

    //注入SignService服务层
    @Autowired
    private SignService signService;

    //根据userinfo表中的id和sign表中的userId连接两个表，并查询两个表中的数据
    @GetMapping("all")
    public List<Sign> all() {
        List<Sign> signs =  signService.about();
        return signs;
    }


}
